﻿using API.UQBuy;
using API.UQBuy.Data;
using Dao.UQBuy;
using Domain.UQBuy.Model.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfService.UQBuy
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“ServiceUser”。
    // 注意: 为了启动 WCF 测试客户端以测试此服务，请在解决方案资源管理器中选择 ServiceUser.svc 或 ServiceUser.svc.cs，然后开始调试。
    public class ServiceUser : IServiceUser
    {
        // GET: /Manage/User/
        public IUser UserBll { get; set; }
        //public IUserDetailDao UserDetailBll { get; set; }
        public void DoWork()
        {
            UserBll.Save(new OzUser() { UserId = Guid.NewGuid().ToString(), UserCode = "test", UserEmail = "yexinw@163.com",  UserMobile = "18721982886", UserPassword = "123456", UserStatus = 1, UserCreatedate = DateTime.Now, UserLoginname = "wangyexin" });
        }

        public string GetData(int value)
        {
            return string.Format("你输入的是: {0}", value);
        }

        public List<OzUserData> GetData()
        {
            return new List<OzUserData>() { new OzUserData() { Id = Guid.NewGuid().ToString(), UserLoginname = "wangyexin" }, new OzUserData() { Id = Guid.NewGuid().ToString(), UserLoginname = "wangyexin" }, new OzUserData() { Id = Guid.NewGuid().ToString(), UserLoginname = "wangyexin" }, new OzUserData() { Id = Guid.NewGuid().ToString(), UserLoginname = "wangyexin" } };
        }
    }
}
